using GLib;
using Slurp.Logger;


string alternatePrefix(string type) {
		return "["+type+"]["+Environment.get_user_name()+"@"+Environment.get_host_name()+":"+Environment.get_current_dir()+"]: ";
}

int main() {

	Logger logger;

	try {
		logger = new Logger("/tmp/testfile.log");
	} catch(Error e) {
		print(e.message+"\n");
		return 1;
	}

	logger.error("Everybody! Go home.. pary is over now");
	logger.warning("Daium! Stupid user broke it.");
	logger.info("did you know that...");
	logger.prefix_delegate = alternatePrefix;
	logger.warning("Warning with different prefix");
	
	return 0;
}
